//
//  ERSettingSkillView.m
//  ExchangeRate
//
//  Created by lanou on 15/11/14.
//  Copyright © 2015年 方义强. All rights reserved.
//

#import "ERSettingSkillView.h"

@implementation ERSettingSkillView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _posterImageView = [[UIImageView alloc] initWithFrame:CGRectMake(20, 130, frame.size.width - 40, frame.size.width - 40)];
        [self addSubview:_posterImageView];
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 90, frame.size.width - 40, 30)];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.textColor = [UIColor whiteColor];
        _titleLabel.font = [UIFont systemFontOfSize:17];
        [self addSubview:_titleLabel];
        
        _descLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 110 + frame.size.width, frame.size.width - 40, 40)];
        _descLabel.textAlignment = NSTextAlignmentCenter;
        _descLabel.textColor = [UIColor lightGrayColor];
        _descLabel.font = [UIFont systemFontOfSize:13];
        _descLabel.numberOfLines = 0;
        [self addSubview:_descLabel];
    }
    return self;
}

- (void)setImgName:(NSString *)imgName
{
    _imgName = imgName;
    _posterImageView.image = [UIImage imageNamed:imgName];
}

- (void)setTitleStr:(NSString *)titleStr
{
    _titleStr = titleStr;
    _titleLabel.text = titleStr;
    _titleLabel.font = [UIFont systemFontOfSize:30];
}

- (void)setDescStr:(NSString *)descStr
{
    _descStr = descStr;
    _descLabel.text = descStr;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
